home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 301-325 / disk_309 / csh / shell.h < prev    next >
C/C++ Source or Header  |  1992-05-06  |  3KB  |  120 lines

  1.  
  2. /*
  3.  * SHELL.H
  4.  *
  5.  * (c)1986 Matthew Dillon     9 October 1986
  6.  *
  7.  *
  8.  * SHELL include file.. contains shell parameters and extern's
  9.  *
  10.  * Version 2.07M by Steve Drew 10-Sep-87
  11.  *
  12.  * Version 4.00A by Carlo Borreo & Cesare Dieni 13-Jan-90
  13.  *
  14.  */
  15.  
  16. #define RAW_CONSOLE 1   /* Set to 0 to compile out Cmd Line Editing */
  17.  
  18. #include <stdio.h>
  19. #include <exec/exec.h>
  20. #include <time.h>
  21. #include <libraries/dos.h>
  22. #include <libraries/dosextens.h>
  23. #include <intuition/intuition.h>
  24. #include <intuition/intuitionbase.h>
  25. #include "shellfunctions.h"
  26. #include <fcntl.h>
  27. #include <libraries/arpbase.h>
  28.  
  29. typedef struct FileInfoBlock FIB;
  30.  
  31. #define bmov movmem
  32.  
  33. #define MAXAV        256        /* Max. # arguments        */
  34. #define MAXSRC        5        /* Max. # of source file levels */
  35. #define MAXIF        10        /* Max. # of if levels        */
  36. #define MAXALIAS    20        /* Max. # of alias levels    */
  37. #define MAXMYFILES    9        /* Max. # of internal files    */
  38.  
  39. #define LEVEL_SET    0        /* which variable list to use   */
  40. #define LEVEL_ALIAS    1
  41. #define LEVEL_LABEL    2
  42.  
  43.     /* EXECOM.C defines */
  44.  
  45. #define FL_DOLLAR    0x01  /* One of the following */
  46. #define FL_BANG        0x02
  47. #define FL_PERCENT    0x04
  48. #define FL_QUOTE    0x08
  49. #define FL_IDOLLAR    0x10  /* Any or all of the following may be set */
  50. #define FL_EOC        0x20
  51. #define FL_EOL        0x40
  52. #define FL_OVERIDE    0x80
  53. #define FL_WILD        0x100
  54. #define FL_MASK        (FL_DOLLAR|FL_BANG|FL_PERCENT|FL_QUOTE)
  55.  
  56. #ifndef NULL
  57. #define NULL 0L
  58. #endif
  59.  
  60. #define CHECKBREAK() dobreak()
  61.  
  62. #ifndef AZTEC_C
  63. struct _dev {
  64.     long  fd;
  65.     short mode;
  66.     };
  67. #endif
  68.  
  69. struct HIST {
  70.     struct HIST *next, *prev;    /* doubly linked list */
  71.     char *line;            /* line in history    */
  72. };
  73.  
  74. struct PERROR {
  75.     int errnum;            /* Format of global error lookup */
  76.     char *errstr;
  77. };
  78.  
  79. struct DPTR {                /* Format of directory fetch pointer */
  80.     BPTR lock;            /* lock on directory   */
  81.     FIB *fib;            /* mod'd fib for entry */
  82.     };
  83.  
  84. extern struct HIST *H_head, *H_tail;
  85. extern struct PERROR Perror[];
  86. extern struct DPTR *dopen();
  87. extern char *set_var(), *get_var(), *next_word();
  88. extern char *get_history(), *compile_av(), *get_pwd();
  89. extern char *malloc(), *strcpy(), *strcat(), *index();
  90. extern char **expand();
  91. extern char *av[];
  92. extern char *Current;
  93. extern int  H_len, H_tail_base, H_stack;
  94. extern int  E_stack;
  95. extern int  Src_stack, If_stack, forward_goto;
  96. extern int  ac;
  97. extern int  debug, Rval, Verbose, disable, Quit;
  98. extern int  Lastresult, atoierr;
  99. extern int  Exec_abortline;
  100. extern int   S_histlen;
  101. extern unsigned int options;
  102. extern long  Cin, Cout, Cout_append;
  103. extern char *Cin_name, *Cout_name;
  104. extern char  Cin_type,  Cout_type;  /* these variables are in transition */
  105. extern char *Pipe1, *Pipe2;
  106.  
  107. extern long Src_base[MAXSRC];
  108. extern long Src_pos[MAXSRC];
  109. extern char If_base[MAXIF];
  110. extern struct Process *Myprocess;
  111. extern struct CommandLineInterface *Mycli;
  112.  
  113. extern struct ArpBase *ArpBase;
  114.  
  115. extern long atol(), Atol(), myatol();
  116.  
  117. extern char    v_titlebar[], v_prompt[], v_hist[], v_histnum[], v_debug[],
  118.         v_verbose[], v_stat[], v_lasterr[], v_cwd[], v_except[],
  119.         v_passed[], v_path[], v_gotofwd[], v_linenum[];
  120.